package cn.gov.cus.rmftquartz.mappers.h2000.provider;

import cn.gov.cus.rmftquartz.entity.ManifestChkNewVo;
import org.apache.ibatis.jdbc.SQL;

/**
 * @author wxming.
 * @date 2018/2/11.
 */
public class ManifestChkNewProvider {

    public String doSelect(ManifestChkNewVo vo){
        SQL sql = new SQL().SELECT("N.ENTRY_ID formId,N.CREATE_DATE createDate,N.I_E_FLAG ieFlag,E.I_E_PORT iEPort,M.MANIFEST_ID manifestId,M.BILL_NO billNo");
        sql.FROM("NEWRSK_H2010_TRANS N INNER JOIN ENTRY_HEAD E ON N.ENTRY_ID=E.ENTRY_ID AND E.TRAF_MODE IN("+vo.getEntryData()+") AND N.STATUS_RESULT='0' LEFT JOIN "+vo.getH2000ChkNewUser()+".MANIFEST_CHK_NEW M ON M.FORM_ID=N.ENTRY_ID");
        sql.ORDER_BY("CREATE_DATE");
        return sql.toString();
    }
}
